package io.xxx.omni.osc

import com.vip.osp.sdk.context.InvocationContext
import vipapis.marketplace.delivery.GetOrdersRequest
import vipapis.marketplace.delivery.SovDeliveryServiceHelper

fun main() {
    val client: SovDeliveryServiceHelper.SovDeliveryServiceClient = SovDeliveryServiceHelper.SovDeliveryServiceClient()
    val invocationContext: InvocationContext = InvocationContext.Factory.getInstance()
    invocationContext.setAppKey("33ef34da")
    invocationContext.setAppSecret("6B6C64F25FDE753C4337F6E306ABAA0E")
    invocationContext.setAccessToken("DD2E05BF26157955441748C9E08F47A4546637B0")
    invocationContext.setAppURL("https://gw.vipapis.com/")
    invocationContext.setLanguage("zh")
    val request1 = GetOrdersRequest()
    request1.setQuery_start_time("2021-09-15 00:00:00")
    request1.setQuery_end_time("2021-09-18 00:00:00")
    request1.setDate_type(2)
    request1.setLimit(200)
    request1.setPage(1)
    System.out.println(client.getOrders(request1))
}